<template>
  <section class="app-main"
           style="min-height: 100%">
    <transition name="fade"
                mode="out-in">
      <keep-alive :include="cachedViews">
        <router-view @trueVideo='videoTrue'></router-view>
      </keep-alive>
    </transition>
  </section>
</template>

<script>
export default {
  name: 'layoutAppMain',
  computed: {
    cachedViews() {
      return this.$store.state.tagsView.cachedViews
    }
    // key() {
    //   return this.$route.name !== undefined ? this.$route.name + +new Date() : this.$route + +new Date()
    // }
  },
  methods: {
    videoTrue(val) {
      //   console.log(val)
      this.$emit('trueVideo', val)
    }
  }
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.app-main {
  position: relative;
  top: 75px;
  // z-index: 0;
}
</style>
